﻿using System;

namespace IceDog.SmallProject.EncryptionAndDecryption
{
    class Program
    {
        static void Main(string[] args)
        {
            var encrptText = "hello everyone";
            //var key = Guid.NewGuid().ToString("N");
            var key = "42c1daa7adc340a28411624f312b5e65";
            Console.WriteLine("-------- .net framework 加密 --------");
            Console.WriteLine("加密前内容：" + encrptText);
            var input = AESFramework.AESEncryptText(encrptText, key);
            Console.WriteLine("加密后字符串为：" + input);
            var text = AESFramework.AESDecryptText(input, key);
            Console.WriteLine("解密后内容：" + text);

            Console.WriteLine("-------- .net core 加密 --------");
            Console.WriteLine("加密前内容：" + encrptText);
            input = AESCore.AESEncryptText(encrptText, key);
            Console.WriteLine("加密后字符串为：" + input);
            text = AESCore.AESDecryptText(input, key);
            Console.WriteLine("解密后内容：" + text);
        }
    }
}
